<template>
  <div class="logo">
    <router-link :to="{name:'index'}">
      <a-button @click='appDrawerClick'>###</a-button><h1 v-if="showTitle">{{ title }}</h1>
    </router-link>
    <app-drawer ref='appDrawer'/>
  </div>
</template>

<script>
import AppDrawer from '@/components/AppDrawer/AppDrawer'
export default {
  name: 'Logo',
  components: {
    AppDrawer
  },
  props: {
    title: {
      type: String,
      default: 'mes',
      required: false
    },
    showTitle: {
      type: Boolean,
      default: true,
      required: false
    }
  },
  methods: {
    appDrawerClick(){
      this.$refs.appDrawer.showDrawer()
    }
  }
}
</script>
